// non-pipeline-related failures.
this._updateServiceCrashBlocklist(
[...this._blocklistFromPreviousCrashes, pipelineConfig.id]);
- } catch (error) {
+ } catch {
this._tryNextPipeline();
return;
}
try {
this._gdmClient.set_enabled_extensions([Gdm.UserVerifierChoiceList.interface_info().name]);
- } catch (e) {
+ } catch {
}
this._settings = new Gio.Settings({schema_id: GdmUtil.LOGIN_SCREEN_SCHEMA});
try {
let [ok_, bytes] = f.load_contents(null);
return new TextDecoder().decode(bytes);
- } catch (e) {
+ } catch {
log(`Failed to load D-Bus interface ${iface}`);
}
try {
fileEnum = dir.enumerate_children('standard::name,standard::type',
Gio.FileQueryInfoFlags.NONE, null);
- } catch (e) {
+ } catch {
fileEnum = null;
}
if (fileEnum != null) {
this._ibusIsSystemdService =
await Shell.util_systemd_unit_exists(
IBUS_SYSTEMD_SERVICE, null);
- } catch (e) {
+ } catch {
this._ibusIsSystemdService = false;
}
// confusing users. We thus don't use it in that case.
_checkIBusVersion(1, 5, 10);
this._panelService.connect('set-content-type', this._setContentType.bind(this));
- } catch (e) {
+ } catch {
}
this._updateReadiness();
const engine =
await this._ibus.get_global_engine_async(-1, this._cancellable);
this._engineChanged(this._ibus, engine.get_name());
- } catch (e) {
+ } catch {
}
}
_onDeleteSurroundingText(_context, offset, nchars) {
try {
this.delete_surrounding(offset, nchars);
- } catch (e) {
+ } catch {
// We may get out of bounds for negative offset on older mutter
this.delete_surrounding(0, nchars + offset);
}
await this._context.process_key_event_async(
keyval, 0, IBus.ModifierType.RELEASE_MASK, -1, null);
return true;
- } catch (e) {
+ } catch {
return false;
}
}
const lines = expr.split('\n');
lines.push(`return ${lines.pop()}`);
obj = await AsyncFunction(commandHeader + lines.join(';'))();
- } catch (e) {
+ } catch {
return [];
}
} else {
let version = result.deepUnpack()[0].deepUnpack();
return haveSystemd() && versionCompare('3.5.91', version);
- } catch (e) {
+ } catch {
return false;
}
}
const [result] = await this._proxy.CanSuspendAsync();
needsAuth = result === 'challenge';
canSuspend = needsAuth || result === 'yes';
- } catch (error) {
+ } catch {
canSuspend = false;
needsAuth = false;
}
const [result] = await this._proxy.CanRebootToBootLoaderMenuAsync();
needsAuth = result === 'challenge';
canRebootToBootLoaderMenu = needsAuth || result === 'yes';
- } catch (error) {
+ } catch {
canRebootToBootLoaderMenu = false;
needsAuth = false;
}
try {
const [sessions] = await this._proxy.ListSessionsAsync();
return sessions;
- } catch (e) {
+ } catch {
return [];
}
}
]);
this._setOperatorName(_findProviderForMccMnc(name, code));
this._setSignalQuality(quality);
- } catch (err) {
+ } catch {
// it will return an error if the device is not connected
this._setSignalQuality(0);
}
try {
const [quality] = await this._proxy.GetSignalQualityAsync();
this._setSignalQuality(quality);
- } catch (err) {
+ } catch {
// it will return an error if the device is not connected
this._setSignalQuality(0);
}
const [bandClass_, band_, sid] =
await this._proxy.GetServingSystemAsync();
this._setOperatorName(_findProviderForSid(sid));
- } catch (err) {
+ } catch {
// it will return an error if the device is not connected
this._setOperatorName(null);
}
try {
const [canShutdown] = await this._session.CanShutdownAsync();
this._canHavePowerOff = canShutdown;
- } catch (e) {
+ } catch {
this._canHavePowerOff = false;
}
this._updatePowerOff();
try {
Pango.parse_markup(_text, -1, '');
return _text;
- } catch (e) {}
+ } catch {}
}
// !allowMarkup, or invalid markup
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
try {
appInfo.get_id(); // catch invalid file encodings
- } catch (e) {
+ } catch {
return false;
}
return !this._appFavorites.isFavorite(appInfo.get_id()) &&
schema_id: 'org.gnome.desktop.app-folders.folder',
path: newFolderPath,
});
- } catch (e) {
+ } catch {
log('Error creating new folder');
return false;
}
let dialog;
try {
dialog = new AudioDeviceSelectionDialog(devices);
- } catch (e) {
+ } catch {
invocation.return_value(null);
return;
}
Gio.FileQueryInfoFlags.NONE,
0,
this._cancellable);
- } catch (e) {
+ } catch {
this._setLoaded();
return;
}
const [inhibited] =
await this._session.IsInhibitedAsync(GNOME_SESSION_AUTOMOUNT_INHIBIT);
this._inhibited = inhibited;
- } catch (e) {}
+ } catch {}
}
_startupMountAll() {
} else {
try {
this._stdin.write('QUIT\n\n', null);
- } catch (e) { /* ignore broken pipe errors */ }
+ } catch { /* ignore broken pipe errors */ }
}
this.destroy();
if (line === '' && this._previousLine === '') {
try {
this._stdin.write('QUIT\n\n', null);
- } catch (e) { /* ignore broken pipe errors */ }
+ } catch { /* ignore broken pipe errors */ }
} else {
this._agent.add_vpn_secret(this._requestId, this._previousLine, line);
this._previousLine = undefined;
enable() {
try {
this.register();
- } catch (e) {
+ } catch {
log('Failed to register AuthenticationAgent');
}
}
disable() {
try {
this.unregister();
- } catch (e) {
+ } catch {
log('Failed to unregister AuthenticationAgent');
}
}
let desktopFile;
try {
[desktopFile] = inhibitor.GetAppIdSync();
- } catch (e) {
+ } catch {
// XXX -- sometimes JIT inhibitors generated by gnome-session
// get removed too soon. Don't fail in this case.
log(`gnome-session gave us a dead inhibitor: ${inhibitor.get_object_path()}`);
return base.replace(/\]$/, ` delegate for ${this.actor.toString().substring(1)}`);
else
return base;
- } catch (e) {
+ } catch {
return base;
}
};
const updatesDir = Gio.File.new_for_path(GLib.build_filenamev(
[global.userdatadir, 'extension-updates', extension.uuid]));
FileUtils.recursivelyDeleteDir(updatesDir, true);
- } catch (e) {
+ } catch {
// not an error
}
try {
FileUtils.recursivelyDeleteDir(extensionDir, false);
FileUtils.recursivelyMoveDir(dir, extensionDir);
- } catch (e) {
+ } catch {
log(`Failed to install extension updates for ${uuid}`);
} finally {
FileUtils.recursivelyDeleteDir(dir, true);
rect.width,
rect.height);
});
- } catch (e) {
+ } catch {
// Only recent IBus versions have support for this signal
// which is used for wayland clients. In order to work
// with older IBus versions we can silently ignore the
try {
keyboardModel = new KeyboardModel(group);
break;
- } catch (e) {
+ } catch {
// Ignore this error and fall back to next model
}
}
try {
let prop = obj[propName];
link = new ObjLink(this._lookingGlass, prop);
- } catch (e) {
+ } catch {
link = new St.Label({text: '<error>'});
}
let box = new St.BoxLayout();
getResult(idx) {
try {
return this._resultsArea.get_child_at_index(idx - this._offset).o;
- } catch (e) {
+ } catch {
throw new Error(`Unknown result at index ${idx}`);
}
}
// toString() can throw
if (msg)
args.unshift(`${msg}:`);
- } catch (e) {}
+ } catch {}
console.error(...args);
};
try {
keyfile.load_from_file(path, 0);
- } catch (e) {
+ } catch {
return;
}
appInfo = Gio.DesktopAppInfo.new(desktopId);
if (!appInfo.should_show())
return;
- } catch (e) {
+ } catch {
log(`Ignoring search provider ${path}: missing DesktopId`);
return;
}
let autoStart = true;
try {
autoStart = keyfile.get_boolean(group, 'AutoStart');
- } catch (e) {
+ } catch {
// ignore error
}
let version = '1';
try {
version = keyfile.get_string(group, 'Version');
- } catch (e) {
+ } catch {
// ignore error
}
remoteProvider.defaultEnabled = true;
try {
remoteProvider.defaultEnabled = !keyfile.get_boolean(group, 'DefaultDisabled');
- } catch (e) {
+ } catch {
// ignore error
}
screenshot.screenshot_area(x, y, width, height, stream),
]);
this._onScreenshotComplete(stream, file, invocation);
- } catch (e) {
+ } catch {
invocation.return_value(new GLib.Variant('(bs)', [false, '']));
} finally {
this._removeShooterForSender(invocation.get_sender());
screenshot.screenshot_window(includeFrame, includeCursor, stream),
]);
this._onScreenshotComplete(stream, file, invocation);
- } catch (e) {
+ } catch {
invocation.return_value(new GLib.Variant('(bs)', [false, '']));
} finally {
this._removeShooterForSender(invocation.get_sender());
screenshot.screenshot(includeCursor, stream),
]);
this._onScreenshotComplete(stream, file, invocation);
- } catch (e) {
+ } catch {
invocation.return_value(new GLib.Variant('(bs)', [false, '']));
} finally {
this._removeShooterForSender(invocation.get_sender());
try {
Main.screenshotUI.open(UIMode.SCREENSHOT_ONLY);
- } catch (e) {
+ } catch {
Main.screenshotUI.disconnectObject(invocation);
invocation.return_value(new GLib.Variant('(bs)', [false, '']));
}
areaRectangle.x, areaRectangle.y,
areaRectangle.width, areaRectangle.height);
invocation.return_value(GLib.Variant.new('(iiii)', retRectangle));
- } catch (e) {
+ } catch {
invocation.return_error_literal(
Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
'Operation was cancelled');
]),
}]);
invocation.return_value(retval);
- } catch (e) {
+ } catch {
invocation.return_error_literal(
Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED,
'Operation was cancelled');
this._setMoreCount(this.provider.canLaunchSearch ? moreCount : 0);
this.show();
callback();
- } catch (e) {
+ } catch {
this._clearResultDisplay();
callback();
}
[success_, fileContent] = file.load_contents(null);
const decoder = new TextDecoder();
newMode = JSON.parse(decoder.decode(fileContent));
- } catch (e) {
+ } catch {
return;
}
try {
await this.app.activate_action('quit', null, 0, -1, null);
- } catch (_error) {
+ } catch {
try {
const appId = this.app.get_id().replace(/\.desktop$/, '');
Util.trySpawn(['flatpak', 'kill', appId]);
new GLib.Variant('(s)', [this._BUS_IFACE]),
null, Gio.DBusCallFlags.NONE, -1, null);
[props] = result.deepUnpack();
- } catch (e) {
+ } catch {
log(`Could not get properties from ${this._BUS_NAME}`);
return;
}
const state = await this._client.check_connectivity_async(null);
if (state >= NM.ConnectivityState.FULL)
this._portalHandler.removeConnection(path);
- } catch (e) { }
+ } catch {}
});
this._client.connectObject(
this._gdmClient.set_enabled_extensions([
Gdm.UserVerifierChoiceList.interface_info().name,
]);
- } catch (e) {
+ } catch {
}
this._adjustment = new St.Adjustment({
try {
let [ok_, bytes] = f.load_contents(null);
return new TextDecoder().decode(bytes);
- } catch (e) {
+ } catch {
console.error(`Failed to load D-Bus interface ${iface}`);
}
function isMarkupValid(markup) {
try {
Pango.parse_markup(markup, -1, '');
- } catch (e) {
+ } catch {
return false;
}
return true;